<template>
	<view class="p-30">
		<view class="font-bold text-center">{{info.title}}</view>
		<view class="mt-20">
			<rich-text :nodes="info.content"></rich-text>
		</view>
	</view>
</template>

<script>
import { queryById } from '../../../api/article';
	export default {
		data() {
			return {
				id: 0,
				info: {}
			};
		},
		onShareAppMessage(res) {
			if (res.from === 'button') { // 来自页面内分享按钮
				console.log(res.target)
			}
			return {
				title: '河口人才招聘小程序',
				path: '/pages/articles/details/details'
			}
		},
		onLoad(options) {
			this.id = options.id
			this.getDetail()
		},
		methods: {
			getDetail() {
				queryById({
					id: this.id
				}).then(res => {
					this.info = res.result
				})
			},
		}
	}
</script>

<style lang="less">

</style>
